# -*- mode: python; -*-
#
#Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#

import platform
Import('DnsEnv')
env = DnsEnv.Clone()

if platform.system() != 'Windows':
    env.AppendUnique(CCFLAGS='-Wno-return-type')

SandeshGenFiles = env.SandeshGenCpp('bind.sandesh')
SandeshGenSrcs = env.ExtractCpp(SandeshGenFiles)

except_env = DnsEnv.Clone()
except_env.CppEnableExceptions()

sandesh_objs = []
for src in SandeshGenSrcs:
    objname = src.replace('.cpp', '.o')
    obj = except_env.Object(objname, src)
    sandesh_objs.append(obj)

bind_interface = env.Library('bind_interface',
                             sandesh_objs + 
                             [
                                'bind_util.cc', 
                                'bind_resolver.cc', 
                                'named_config.cc', 
                                'xmpp_dns_agent.cc', 
                             ])
